﻿using MQ.Core.Common;
using MQ.Core.Entity.System;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace MQ.Core.IRepository.System
{
    public interface IUserRepository
    {
        void Add(UserEntity entity);
        Task AddAsync(UserEntity entity);
        void Update(UserEntity entity);
        Task UpdateAsync(UserEntity entity);
        void Delete(string ids);
        Task DeleteAsync(string ids);
        IEnumerable<UserEntity> GetPageList(Pagination pagination, string query);
        Task<IEnumerable<UserEntity>> GetPageListAsync(Pagination pagination, string query);
        IEnumerable<UserEntity> GetList(string query);
        Task<IEnumerable<UserEntity>> GetListAsync(string query);
        UserEntity GetEntity(long id, string query=null);
        Task<UserEntity> GetEntityAsync(long id, string query = null);
        bool Exist(string query);
        Task<bool> ExistAsync(string query);
    }
}
